package com.sphd.emanu.activity.newaddedmaterialsclassify;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.Toolbar;
import android.widget.TextView;

import com.sphd.emanu.R;
import com.sphd.emanu.config.Constant;
import com.sphd.emanu.mvp.MVPBaseActivity;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * 新增&&材料分类共用界面
 *
 * @Author Hu
 * @Time 2017/5/25 -- 17:14.
 * @Email 87683202@qq.com
 */
public class NewaddedMaterialsClassifyActivity extends MVPBaseActivity<NewaddedMaterialsClassifyContract.View, NewaddedMaterialsClassifyPresenter>
        implements NewaddedMaterialsClassifyContract.View {

    @BindView(R.id.tv_menu)
    TextView tvMenu;
    @BindView(R.id.toolbar)
    Toolbar toolbar;
    @BindView(R.id.my_recycler)
    RecyclerView myRecycler;
    @BindView(R.id.my_swf)
    SwipeRefreshLayout mySwf;
    Intent intent;
    Bundle bundle;
    int flag=0;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_newadded_materials_classify);
        ButterKnife.bind(this);
        initView();

    }

    private void initView() {
        intent=getIntent();
        bundle=intent.getExtras();
        flag=bundle.getInt(Constant.FLAG);
        if (flag==0){
            setTitleBar(toolbar,"新增材料");
            tvMenu.setText( "保存");
        }else if (flag==1){
            setTitleBar(toolbar,"材料分类");
            tvMenu.setText( "新增分类");
        }else {
            setTitleBar(toolbar,"材料库位");
            tvMenu.setText( "新增库位");
        }
    }

    @OnClick(R.id.tv_menu)
    public void onViewClicked() {
    }
}
